package com.fqr;

public abstract class BaseErrorHandler implements ErrorHandler {
	
	protected void extractCause(StringBuffer buf, Throwable e) {
		for(StackTraceElement trace : e.getStackTrace())
			buf.append(trace).append('\n');
		
		if(e.getCause() != null) {
			buf.append("caused by...").append('\n');
			extractCause(buf, e.getCause());
		}
	}

}
